This script should not complain at all if we are not running under
Xen. Check this right at the start.
This will enable improvements to the following code, which will no
longer have to deal with the `not running under Xen' case.
Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
Acked-by: Hans van Kranenburg <hans@knorrie.org>
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC="Xen daemons"
+case "$(cat /sys/hypervisor/type 2>/dev/null)" in
+xen) ;;
+*) exit 0 ;; # not running under Xen
+esac
ROOT=$(/usr/lib/xen-common/bin/xen-dir 2>/dev/null)
if [ $? -ne 0 ]; then
log_warning_msg "Not running within Xen or no compatible utils"